package com.cskaoyan.bean.bo.goods;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author: 冯子靖
 * @Description:
 * @Date: 2022/7/20 9:04
 */
@Data
public class AdminGoodsAttributesUpdateBO {

    private Integer id;

    private String attribute;

    private String value;

    private Integer goodsId;

    private Date addTime;

    private Date updateTime;

    private boolean deleted;

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        try {
            this.addTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(addTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        try {
            this.updateTime = this.addTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(updateTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }

    }
}
